package com.llq.util;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

import org.junit.Assert;
import org.junit.Test;

import com.llq.util.DateUtil;

public class DateUtilTest {
	
	@Test
	public void CreatDateTest(){
		Date date=DateUtil.creatDate(2009, 5, 1);
		GregorianCalendar calendar=new GregorianCalendar();
		calendar.setTime(date);
		Assert.assertEquals(2009, calendar.get(Calendar.YEAR));
		Assert.assertEquals(Calendar.MAY, calendar.get(Calendar.MONTH));
		Assert.assertEquals(1, calendar.get(Calendar.DATE));
	}

}
